package com.bosssoft.trainee.gateway.feign.hystrix;

import com.bosssoft.trainee.gateway.feign.GatewayFeign;
import com.bosssoft.trainee.mbg.result.CommonResult;
import com.bosssoft.trainee.mbg.vo.UserVO;
import com.bosssoft.trainee.security.bo.UserBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: wuxin
 * @Project: rbac-SpringCloud
 * @Date: 2022/7/14
 * @Description:
 */
@Component
@Slf4j
public class GateWayHystrix implements GatewayFeign {
    @Override
    public UserBO loadUserByUsername(String username) {
        log.error("向rbac微服务请求UserDetail失败！");
        return null;
    }

    @Override
    public CommonResult<Boolean> checkWorkerNum(String workerNum,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> checkUsername(String username,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> checkRoleCode(String code,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> checkResoCode(String code,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> checkApi(String api,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> checkUrl(String url,@RequestParam("id")Integer id) {
        return CommonResult.failed();
    }

    @Override
    public UserVO getUSerInfo(String token) {
        return null;
    }
}
